import React from "react";
import Son from "./son.js";
import "./App.css";
class App extends React.PureComponent {
  changeAge = (msg) => {
    console.log(msg, "msg");
    this.setState({
      age: msg,
    });
  };
  state = {
    age: "18",
  };
  render() {
    return (
      <div>
        hello
        <div className="father son" style={{ color: "white" }}>
          father
        </div>
        <Son
          age={this.state.age}
          changeAge={this.changeAge}
          a={<div>具名插槽a</div>}
          scopeslot={(scope) => {
            return <div>作用域插槽{scope}</div>;
          }}
        >
          <div>children from Son</div>
          <div>222</div>
        </Son>
      </div>
    );
  }
}

export default App;
